package com.dao;

import com.dbc.DatabaseConnection;

public class AdminProxy implements IAdminDao {
	private DatabaseConnection dbc = null;
	private IAdminDao dao = null;

	public AdminProxy() throws Exception {
		this.dbc = new DatabaseConnection();
		this.dao = new AdminReal(this.dbc.getConnection());
	}

	public String checkLogin(String aUserName, String aUserPassword) throws Exception {
		String aName = null;
		try {
			aName = this.dao.checkLogin(aUserName, aUserPassword);
		} catch (Exception e) {
			throw e;
		} finally {
			this.dbc.close();
		}
		return aName;
	}

}
